/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.web.mapper;

import org.apache.ibatis.annotations.Param;

import com.jeeplus.core.persistence.BaseMapper;
import com.jeeplus.core.persistence.annotation.MyBatisMapper;
import com.jeeplus.modules.web.entity.WxAgentsRecording;

/**
 * 分销商收入记录MAPPER接口
 * @author rongjie
 * @version 2017-09-02
 */
@MyBatisMapper
public interface WxAgentsRecordingMapper extends BaseMapper<WxAgentsRecording> {

    WxAgentsRecording findListMoney(WxAgentsRecording wxAgentsRecording);

    Double findRecordingOrderMoneyList(WxAgentsRecording wxAgentsRecording);

    /**
     * 根据agentId和orderNumber获取记录，用以判断该代理商是否已获取过此订单的分佣
     * @param agentId 代理商ID
     * @param orderNumber 订单号
     * @return
     */
    WxAgentsRecording getRecordingByAgentIdAndOrderNumber(@Param("agentId")String agentId, @Param("orderNumber")String orderNumber);
}
